<%@ page language="java"  pageEncoding="utf-8"%>
<%@ page import="com.ejoysoft.wlanyz.business.Ac,java.util.ArrayList,com.ejoysoft.wlanyz.business.Testtemplate,com.ejoysoft.common.Constants,com.ejoysoft.common.exception.NoRightException,com.ejoysoft.common.exception.IdObjectException" %>
<%@page import="java.util.Vector"%>
<%@ include file="../include/jsp/head.jsp"%>
<%
if(!globa.userSession.hasRight("10005"))
      throw new NoRightException("用户不具备操作该功能模块的权限，请与系统管理员联系！");
%>

<%

try{
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    //System.out.println("hhhhhhhhhhhhhhhhh path: "+path+"ooooooooooooooo"+basePath);
    Testtemplate obj1=new Testtemplate(globa);
	String strId = ParamUtil.getString(request,"strId","");
	if(strId.equals(""))
    	throw new IdObjectException("请求处理的信息id为空！或者已经不存在");
    String where="where strId='"+strId+"'";
    Testtemplate obj0=obj1.show(where);
    
    String strProjectsName = obj1.returnProNames(obj0.getStrProjectsId());
    if(obj0==null){
        globa.closeCon();
        throw new IdObjectException("请求处理的信息id='"+strId+"'对象为空！","请检查该信息的相关信息");
    }

%> 
    

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
<link href="../css/main.css" rel="stylesheet" type="text/css" />
<script src="../scripts/jsframework.js"></script>
<script language="JavaScript" src="../js/jquery-1.4.1.min.js"></script>
<script src="../scripts/jquery-1.4.1.min.js"></script>
<script src="../include/js/chkFrm.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css">
body {
	background-color: #f2f8ff;
}
.sel1{ width:160px;}
.STYLE1 {color: #FF0000}
a{ font-size:12px; color:#214263; text-decoration:none; }
a:hover{ font-size:12px; color:#ffffff; background-color:#ff9900; text-decoration:none;display:block;} 
</style>
</head>
<script language="javascript">

function openwindow(){ 
	var temp= "";
	temp=window.showModalDialog("testtemplate_addchoose.jsp",window,"status:no;scroll:no;dialogWidth:500px;dialogHeight:500px"); 
	document.all.strProjectsName.value=""; 
	if(temp!=null){
		subtemp=temp.substring(9);
		document.all.strProjectsName.value += subtemp; 
		
	}
	
} 
function chkFrm() {
if(trim(frm.strTemplateName.value)=="") {
       alert("请输入测试模板名称！！！")
       frm.strTemplateName.focus();
       return false;
        }  
        if(trim(frm.strProjectsName.value)=="") {
       alert("请选择测试项！！！")
       frm.strProjectsName.focus();
       return false;
        }  
   frm.submit();
    }

</script>

<body>


<form name="frm" method="post" action="testtemplate_act.jsp" onSubmit="return Validator.Validate(this,2);">

<input type="hidden" name="<%=Constants.ACTION_TYPE%>" value="<%=Constants.UPDATE_STR%>"></input>
<input type="hidden" name=strId value="<%=obj0.getStrId()%>">

<div class="lf_list">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr>
    <td height="30"><img src="../images/ri_list.jpg" width="14" height="14" align="bottom" />&nbsp;<font size="2px">您现在所在的位置：</font><font color="#0e7cc9" size="2px">任务管理 </font><font size="2px">&gt; 测试模板配置管理</font><font size="2px">&gt; 修改</font></td>
  </tr>
</table>
<table id="tb" width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
 <tr> <td class="listtit1"align="left">&nbsp; &nbsp;<font size="2px"> 修改</font></td>
</tr>
 
  <tr>
    <td bgcolor="#FFFFFF" class="listd" style="border-left:1px solid #dddddd;border-right:1px solid #dddddd;">&nbsp;
   
    <table width="92%" border="0" align="center" cellpadding="0" cellspacing="0">        
     <tr>
       <td >
       <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin:10px 0px 2px 0px;">
       <tr>
	     <td width="4%" align="left" >
	     </td>

		</tr>
       </table></td></tr>

          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="35%" height="30" align="right" class="left_txt2"><font size="2px">测试模板名称：</font></td>
                <td width="3%">&nbsp;</td>
                <td width="260"><input type="text"  class="ipt" name="strTemplateName" id="strTemplateName" value="<%=obj0.getStrTemplateName()%>"/></td>
              </tr>
              <tr>
               <td width="35%" height="30" align="right" class="left_txt2"><font size="2px">测试项集合：</font></td>
                <td width="3%">&nbsp;</td>
            	<td width="260"><input type="text"  class="ipt" name="strProjectsName" id="strProjectsName" value="<%=strProjectsName%>" readonly="true"/> </td>
              </tr>
              <tr>
					<td width="35%" height="30" align="right" class="left_txt2" ><font size="2px">选择测试项目：</font></td>
             		<td width="3%">&nbsp;</td>
                    <td align="left">
        			<label><font size="3" color="red">
        			<input type="button" name="add" value="选择测试项" onclick="openwindow()"/></font></label>
        			</td>
              </tr>
            <tr>
              <td height="30" colspan="3">&nbsp;</td>
            </tr>
            </table>
           <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
               <td width="3%" >&nbsp; <br></td>
              <td width="40%" height="20" align="right"> <input name="B1" type="button"   value="确  定" onclick="chkFrm()"  class="ipt2" /></td>
               <td width="3%" >&nbsp; <br></td>
               <td width="6%" height="20" > <input type="button" name="b_reset"    value="重 置"  onclick="frm.reset();" style="cursor:hand" class="ipt2"/></td>
               <td width="3%" >&nbsp; <br></td>
               <td width = "30%"><input type="button"  onclick="window.location.href='testtemplate_list.jsp';" value="返 回" class="ipt2" style="cursor:hand"/></td>
               
               <td height="30" class="left_txt2">&nbsp;</td>               
            </tr> 
            </table>
            </td>
          </tr>
        </table>
  
</td>
  </tr>
 
</table>
 </div>
<p><br />
</p>
    </form>
 
</body>
</html>
<%}catch(Exception e){e.printStackTrace();} %>
<%@ include file="../include/jsp/footer.jsp"%>
